﻿<UserControl x:Class="EzDesk.DesktopClient.View.AppItemView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel>
        <Border Style="{StaticResource LabelBorder}"  Cursor="Hand">
            <Grid>
                <TextBlock Margin="5,0,0,0"  Text="{Binding AppModel.Title}"  MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
                <TextBlock Margin="0,0,5,0" Text="{Binding TaskItemViewModelCollection.Count}" FontSize="10" VerticalAlignment="Bottom" HorizontalAlignment="Right"></TextBlock>
            </Grid>
        </Border>
        <ItemsControl ItemsSource="{Binding TaskItemViewModelCollection}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel></WrapPanel>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <ContentControl  Content="{Binding View}"></ContentControl>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </StackPanel>
</UserControl>
